/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.capex.javaee.sockets;

import java.net.InetAddress;

/**
 *
 * @author Acer
 */
public class ex {

    public static void main(String[] args) {
        try {
            final String domain = "www.ebay.com";
            InetAddress[] allByName = InetAddress.getAllByName(domain);
            for(InetAddress temp : allByName){
                System.out.println("HostName: "+temp.getHostName());
                System.out.println("IpAdress: "+temp.getHostAddress());
            }
        } catch (Exception ex) {
        }
    }
}
